def hold_retrieve_mix_1():
  """ SipPhone1 call to DN2,  DN2 hold, DN2 internal  call to SipPhone3, rel. DN2, DN2 retrieve, rel. SipPhone1"""
  SipPhone1.MakeCall(DN2)
  DN2.AnswerCall()
  DN2.HoldCall()
  DN2.MakeCall(DN3)
  SipPhone3.AnswerCall()
  DN2.ReleaseCall()
  DN2.RetrieveCall()
  SipPhone1.ReleaseCall()


def hold_retrieve_mix_2():
  """ Inbound call to SipPhone1,  SipPhone1 hold, SipPhone1 internal  call to DN2, rel. SipPhone1, SipPhone1 retrieve, rel.ExtDn"""
  Ext1SipPhone1.MakeCall(DN1)
  SipPhone1.AnswerCall()
  SipPhone1.HoldCall()
  SipPhone1.MakeCall(DN2)
  DN2.AnswerCall()
  SipPhone1.ReleaseCall()
  SipPhone1.RetrieveCall()
  Ext1SipPhone1.ReleaseCall()

def hold_retrieve_mix_3():
  """ Outbound call SipPhone1 to ExtDN,  SipPhone1 hold, SipPhone1 intern. call to DN2, rel. SipPhone1, SipPhone1 retrieve, rel.ExtDn"""
  SipPhone1.MakeCall(Ext1DN2)
  Ext1DN2.AnswerCall()
  SipPhone1.HoldCall()
  SipPhone1.MakeCall(DN2)
  DN2.AnswerCall()
  SipPhone1.ReleaseCall()
  SipPhone1.RetrieveCall()
  Ext1DN2.ReleaseCall()

def hold_retrieve_mix_4():
  """ SipPhone1 call to DN2,  DN2 hold, DN2 outbound call , rel. DN2, DN2 retrieve, rel. SipPhone1"""
  SipPhone1.MakeCall(DN2)
  DN2.AnswerCall()
  DN2.HoldCall()
  DN2.MakeCall(Ext1DN2)
  Ext1DN2.AnswerCall()
  DN2.ReleaseCall()
  DN2.RetrieveCall()
  SipPhone1.ReleaseCall()
  

def hold_retrieve_mix_5():
  """ Inbound call to SipPhone1,  SipPhone1 hold, SipPhone1 outbound  call,SipPhone1 retrieve, rel.ExtDn"""
  Ext1SipPhone1.MakeCall(DN1)
  SipPhone1.AnswerCall()
  SipPhone1.HoldCall()
  SipPhone1.MakeCall(Ext1DN2)
  Ext1DN2.AnswerCall()
  SipPhone1.ReleaseCall()
  SipPhone1.RetrieveCall()
  Ext1SipPhone1.ReleaseCall()

def hold_retrieve_mix_6():
  """ SipPhone1 call to DN2,  DN2 hold, DN2 unsuccesful intern. call to SipPhone3, DN2 retrieve, rel. SipPhone1"""
  SipPhone1.MakeCall(DN2)
  DN2.AnswerCall()
  DN2.HoldCall()
  DN2.MakeCall(DN3)
  DN2.ReleaseCall()
  DN2.RetrieveCall()
  SipPhone1.ReleaseCall()

def hold_retrieve_mix_7():
  """ Inbound call to SipPhone1,  SipPhone1 hold,  SipPhone1 unsuccesful intern. call to DN2, SipPhone1 retrieve, rel.ExtDn"""
  Ext1SipPhone1.MakeCall(DN1)
  SipPhone1.AnswerCall()
  SipPhone1.HoldCall()
  SipPhone1.MakeCall(DN2)
  SipPhone1.ReleaseCall()
  SipPhone1.RetrieveCall()
  Ext1SipPhone1.ReleaseCall()

def hold_retrieve_mix_8():
  """ Outbound call SipPhone1 to ExtDN,  SipPhone1 hold, SipPhone1 unsuccesful intern. call,SipPhone1 retrieve, rel.ExtDn"""
  SipPhone1.MakeCall(Ext1DN2)
  Ext1DN2.AnswerCall()
  SipPhone1.HoldCall()
  SipPhone1.MakeCall(DN2)
  SipPhone1.ReleaseCall()
  SipPhone1.RetrieveCall()
  Ext1DN2.ReleaseCall()

def hold_retrieve_mix_9():
  """ SipPhone1 call to DN2,  DN2 hold, DN2 unsuccesful outbound call, DN2 retrieve, rel. SipPhone1"""
  SipPhone1.MakeCall(DN2)
  DN2.AnswerCall()
  DN2.HoldCall()
  DN2.MakeCall(Ext1DN2)
  DN2.ReleaseCall()
  DN2.RetrieveCall()
  SipPhone1.ReleaseCall()

def hold_retrieve_mix_10():
  """ Inbound call to SipPhone1,  SipPhone1 hold,SipPhone1 unsuccesful outbound call,SipPhone1 retrieve, rel.ExtDn"""
  Ext1SipPhone1.MakeCall(DN1)
  SipPhone1.AnswerCall()
  SipPhone1.HoldCall()
  SipPhone1.MakeCall(Ext1DN2)
  SipPhone1.ReleaseCall()
  SipPhone1.RetrieveCall()
  Ext1SipPhone1.ReleaseCall()


def hold_retrieve_mix_11():
  """Internal call, originator hold"""
  SipPhone1.MakeCall(DN2)
  SipPhone1.HoldCall()
  SipPhone1.MakeCall(DN3)
  SipPhone3.AnswerCall()
  DN2.AnswerCall()
  SipPhone1.ReleaseCall()
  DN2.ReleaseCall()

  
def hold_retrieve_mix_12():
  SipPhone1.MakeCall(DN2)
  SipPhone1.HoldCall()
  SipPhone1.MakeCall(DN3)
  SipPhone3.AnswerCall()
  SipPhone1.ReleaseCall()
  DN2.AnswerCall()
  SipPhone1.RetrieveCall()
  DN2.ReleaseCall()

def hold_retrieve_mix_13():
  SipPhone1.MakeCall(DN2)
  SipPhone1.HoldCall()
  SipPhone1.MakeCall(DN3)
  SipPhone3.AnswerCall()
  SipPhone1.ReleaseCall()
  SipPhone1.RetrieveCall()
  DN2.AnswerCall()
  DN2.ReleaseCall()




